<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        let arr = ['apple','banana','orange','tomato'];
        // for(let i = 0;i<arr.length;i++){
        //     console.log(arr[i]);
        // }

        // arr.forEach(function(val,index,arr){
        //     console.log(this,val,index,arr);
        // },123);//123this指向

        arr.forEach((val,index,arr)=>{
            console.log(this,val,index,arr);
        },123);
    </script>
</head>
<body>
    
</body>
</html>